module.exports = (err,ctx)=>{
    console.log(err,"err");
    switch(err.code){
        case '10001':
            ctx.status = 400;break;
        case "10002":
            ctx.status =409;break;
        case "10003":
            ctx.status=400;break;
        case "10004":
            ctx.status=400;break;
        case "10005":
            ctx.status=400;break;
        case "10101":
            ctx.status=400;break;
        default:
            ctx.status = 500;
    }
    ctx.body = {
        code:err.code,
        message:err.message,
        result:err.result,
    }
}